home *** CD-ROM | disk | FTP | other *** search
/ The CICA Windows Explosion! / The CICA Windows Explosion! - Disc 2.iso / patches / ami301c.zip / BUILD.SM$ / BUILD.SMM
INI File  |  1993-05-19  |  47KB  |  2,966 lines

  1. [ver]
  2.     4
  3. [sty]
  4.     
  5. [files]
  6. [charset]
  7.     82
  8.     ANSI (Windows, IBM CP 1252)
  9. [revisions]
  10.     0
  11. [prn]
  12.     QMS-PS 810
  13. [port]
  14.     LPT1:
  15. [lang]
  16.     1
  17. [desc]
  18.     Automated utility useful in constructing calculation applications.
  19.     
  20.     
  21.     
  22.     
  23.     737867369
  24.     18
  25.     734822992
  26.     2133
  27.     14
  28.     0
  29.     0
  30.     0
  31.     0
  32.     
  33.     
  34.     
  35.     
  36.     
  37.     
  38.     1
  39. [fopts]
  40.     0
  41.     1
  42.     0
  43.     0
  44. [lnopts]
  45.     2
  46.     Body Text
  47.     1
  48. [docopts]
  49.     5
  50.     2
  51. [GramStyle]
  52.     
  53. [ParaNum]
  54.     1
  55. [tag]
  56.     Body Text
  57.     2
  58.     [fnt]
  59.         Times New Roman
  60.         240
  61.         0
  62.         49152
  63.     [algn]
  64.         1
  65.         1
  66.         0
  67.         0
  68.         0
  69.     [spc]
  70.         33
  71.         273
  72.         1
  73.         0
  74.         0
  75.         1
  76.         100
  77.     [brk]
  78.         4
  79.     [line]
  80.         8
  81.         0
  82.         1
  83.         0
  84.         1
  85.         1
  86.         1
  87.         10
  88.         10
  89.         1
  90.     [spec]
  91.         0
  92.         2
  93.         
  94.         0
  95.         1
  96.         1
  97.         0
  98.         0
  99.         0
  100.         0
  101.     [nfmt]
  102.         280
  103.         1
  104.         2
  105.         .
  106.         ,
  107.         $
  108.     Body Text
  109.     0
  110.     0
  111. [tag]
  112.     Body Single
  113.     3
  114.     [fnt]
  115.         Times New Roman
  116.         240
  117.         0
  118.         49152
  119.     [algn]
  120.         1
  121.         1
  122.         0
  123.         0
  124.         0
  125.     [spc]
  126.         33
  127.         273
  128.         1
  129.         0
  130.         0
  131.         1
  132.         100
  133.     [brk]
  134.         4
  135.     [line]
  136.         8
  137.         0
  138.         1
  139.         0
  140.         1
  141.         1
  142.         1
  143.         10
  144.         10
  145.         1
  146.     [spec]
  147.         0
  148.         0
  149.         
  150.         0
  151.         1
  152.         1
  153.         0
  154.         0
  155.         0
  156.         0
  157.     [nfmt]
  158.         280
  159.         1
  160.         2
  161.         .
  162.         ,
  163.         $
  164.     Body Single
  165.     0
  166.     0
  167. [tag]
  168.     Bullet
  169.     4
  170.     [fnt]
  171.         Times New Roman
  172.         240
  173.         0
  174.         49152
  175.     [algn]
  176.         1
  177.         1
  178.         0
  179.         288
  180.         288
  181.     [spc]
  182.         33
  183.         273
  184.         1
  185.         0
  186.         0
  187.         1
  188.         100
  189.     [brk]
  190.         4
  191.     [line]
  192.         8
  193.         0
  194.         1
  195.         0
  196.         1
  197.         1
  198.         1
  199.         10
  200.         10
  201.         1
  202.     [spec]
  203.         0
  204.         0
  205.         <*0>
  206.         360
  207.         1
  208.         1
  209.         0
  210.         0
  211.         0
  212.         0
  213.     [nfmt]
  214.         272
  215.         1
  216.         2
  217.         .
  218.         ,
  219.         $
  220.     Bullet
  221.     0
  222.     0
  223. [tag]
  224.     Bullet 1
  225.     5
  226.     [fnt]
  227.         Times New Roman
  228.         240
  229.         0
  230.         49152
  231.     [algn]
  232.         1
  233.         1
  234.         288
  235.         288
  236.         288
  237.     [spc]
  238.         33
  239.         273
  240.         1
  241.         0
  242.         0
  243.         1
  244.         100
  245.     [brk]
  246.         4
  247.     [line]
  248.         8
  249.         0
  250.         1
  251.         0
  252.         1
  253.         1
  254.         1
  255.         10
  256.         10
  257.         1
  258.     [spec]
  259.         0
  260.         0
  261.         <*5>
  262.         0
  263.         1
  264.         1
  265.         0
  266.         0
  267.         0
  268.         0
  269.     [nfmt]
  270.         280
  271.         1
  272.         2
  273.         .
  274.         ,
  275.         $
  276.     Bullet 1
  277.     0
  278.     0
  279. [tag]
  280.     Number List
  281.     6
  282.     [fnt]
  283.         Times New Roman
  284.         240
  285.         0
  286.         49152
  287.     [algn]
  288.         1
  289.         1
  290.         360
  291.         360
  292.         360
  293.     [spc]
  294.         33
  295.         273
  296.         1
  297.         0
  298.         0
  299.         1
  300.         100
  301.     [brk]
  302.         4
  303.     [line]
  304.         8
  305.         0
  306.         1
  307.         0
  308.         1
  309.         1
  310.         1
  311.         10
  312.         10
  313.         1
  314.     [spec]
  315.         0
  316.         0
  317.         <*:>.
  318.         360
  319.         1
  320.         1
  321.         0
  322.         16
  323.         0
  324.         0
  325.     [nfmt]
  326.         272
  327.         1
  328.         2
  329.         .
  330.         ,
  331.         $
  332.     Number List
  333.     0
  334.     0
  335. [tag]
  336.     Subhead
  337.     7
  338.     [fnt]
  339.         Times New Roman
  340.         240
  341.         0
  342.         49155
  343.     [algn]
  344.         1
  345.         1
  346.         0
  347.         0
  348.         0
  349.     [spc]
  350.         33
  351.         273
  352.         1
  353.         72
  354.         72
  355.         1
  356.         100
  357.     [brk]
  358.         68
  359.     [line]
  360.         8
  361.         0
  362.         1
  363.         0
  364.         1
  365.         1
  366.         1
  367.         10
  368.         10
  369.         1
  370.     [spec]
  371.         0
  372.         1
  373.         
  374.         0
  375.         1
  376.         1
  377.         0
  378.         0
  379.         0
  380.         0
  381.     [nfmt]
  382.         272
  383.         1
  384.         2
  385.         .
  386.         ,
  387.         $
  388.     Body Text
  389.     0
  390.     0
  391. [tag]
  392.     Title
  393.     8
  394.     [fnt]
  395.         Arial
  396.         360
  397.         0
  398.         16385
  399.     [algn]
  400.         4
  401.         1
  402.         0
  403.         0
  404.         0
  405.     [spc]
  406.         33
  407.         446
  408.         1
  409.         144
  410.         72
  411.         1
  412.         100
  413.     [brk]
  414.         16
  415.     [line]
  416.         8
  417.         0
  418.         1
  419.         0
  420.         1
  421.         1
  422.         1
  423.         10
  424.         10
  425.         1
  426.     [spec]
  427.         0
  428.         0
  429.         
  430.         0
  431.         1
  432.         1
  433.         0
  434.         0
  435.         0
  436.         0
  437.     [nfmt]
  438.         272
  439.         1
  440.         2
  441.         .
  442.         ,
  443.         $
  444.     Title
  445.     0
  446.     0
  447. [tag]
  448.     Header
  449.     9
  450.     [fnt]
  451.         Times New Roman
  452.         240
  453.         0
  454.         49152
  455.     [algn]
  456.         1
  457.         1
  458.         0
  459.         0
  460.         0
  461.     [spc]
  462.         33
  463.         273
  464.         1
  465.         0
  466.         0
  467.         1
  468.         100
  469.     [brk]
  470.         4
  471.     [line]
  472.         8
  473.         0
  474.         1
  475.         0
  476.         1
  477.         1
  478.         1
  479.         10
  480.         10
  481.         1
  482.     [spec]
  483.         0
  484.         0
  485.         
  486.         0
  487.         1
  488.         1
  489.         0
  490.         0
  491.         0
  492.         0
  493.     [nfmt]
  494.         280
  495.         1
  496.         2
  497.         .
  498.         ,
  499.         $
  500.     Header
  501.     0
  502.     0
  503. [tag]
  504.     Footer
  505.     11
  506.     [fnt]
  507.         Times New Roman
  508.         240
  509.         0
  510.         49152
  511.     [algn]
  512.         1
  513.         1
  514.         0
  515.         0
  516.         0
  517.     [spc]
  518.         33
  519.         273
  520.         1
  521.         0
  522.         0
  523.         1
  524.         100
  525.     [brk]
  526.         4
  527.     [line]
  528.         8
  529.         0
  530.         1
  531.         0
  532.         1
  533.         1
  534.         1
  535.         10
  536.         10
  537.         1
  538.     [spec]
  539.         0
  540.         0
  541.         
  542.         0
  543.         1
  544.         1
  545.         0
  546.         0
  547.         0
  548.         0
  549.     [nfmt]
  550.         280
  551.         1
  552.         2
  553.         .
  554.         ,
  555.         $
  556.     Footer
  557.     0
  558.     0
  559. [lay]
  560.     Standard
  561.     513
  562.     [rght]
  563.         15840
  564.         12240
  565.         1
  566.         576
  567.         720
  568.         1
  569.         1080
  570.         576
  571.         0
  572.         1
  573.         0
  574.         1
  575.         0
  576.         2
  577.         1
  578.         576
  579.         11664
  580.         12
  581.         1
  582.         720
  583.         1
  584.         1440
  585.         1
  586.         2160
  587.         1
  588.         2880
  589.         1
  590.         3600
  591.         1
  592.         4320
  593.         1
  594.         5040
  595.         1
  596.         5760
  597.         1
  598.         6480
  599.         1
  600.         7200
  601.         1
  602.         7920
  603.         1
  604.         8640
  605.     [hrght]
  606.     [lyfrm]
  607.         1
  608.         11200
  609.         0
  610.         0
  611.         12240
  612.         1080
  613.         0
  614.         1
  615.         3
  616.         1 0 0 0 0 0 0
  617.         0
  618.         0
  619.         1
  620.     [frmlay]
  621.         1080
  622.         12240
  623.         1
  624.         1440
  625.         72
  626.         1
  627.         792
  628.         1440
  629.         0
  630.         1
  631.         0
  632.         1
  633.         1
  634.         0
  635.         1
  636.         1440
  637.         10800
  638.         2
  639.         2
  640.         4680
  641.         3
  642.         9360
  643.     [txt]
  644. >
  645.     [frght]
  646.     [lyfrm]
  647.         1
  648.         13248
  649.         0
  650.         15120
  651.         12240
  652.         15840
  653.         0
  654.         1
  655.         3
  656.         1 0 0 0 0 0 0
  657.         0
  658.         0
  659.         2
  660.     [frmlay]
  661.         15840
  662.         12240
  663.         1
  664.         1440
  665.         648
  666.         1
  667.         15192
  668.         1440
  669.         0
  670.         1
  671.         0
  672.         1
  673.         1
  674.         0
  675.         1
  676.         1440
  677.         10800
  678.         2
  679.         2
  680.         4680
  681.         3
  682.         9360
  683.     [txt]
  684. >
  685. [elay]
  686. [l1]
  687.     0
  688. [edoc]
  689. <:#284,11088>' Peyton McManus
  690.  
  691. <:#284,11088>' Lotus WPD
  692.  
  693. <:#284,11088>' this macro requires a file builder.sam to be present in the currenct macro dir
  694.  
  695. <:#284,11088>
  696.  
  697. @Subhead@<:#284,11088>' these are the text strings for the main dialog box
  698.  
  699. <:#284,11088>
  700.  
  701. <:#284,11088>Define    MainText    "There are three easy steps to creating a custom calculation application."
  702.  
  703. <:#284,11088>
  704.  
  705. <:#284,11088>Define    FirstStep    "You are on step one."
  706.  
  707. <:#284,11088>Define SecondStep    "You are on step two."
  708.  
  709. <:#284,11088>Define ThirdStep    " You are on step three."
  710.  
  711. <:#284,11088>
  712.  
  713. <:#284,11088>Define    DefineText    "(What it is called, how many variables, etc...)"
  714.  
  715. <:#284,11088>Define    DesignText    "(What are the variable names and formula)"
  716.  
  717. <:#284,11088>Define    RunText    "(Run the application)"
  718.  
  719. <:#284,11088>
  720.  
  721. <:#568,11088>Define    WelcomeText    "This is the example text that will be placed into the welcome box and will explain how the app works"
  722.  
  723. <:#284,11088>
  724.  
  725. <:#284,11088>' Defines for the desing dialog box
  726.  
  727. <:#568,11088>Define        Number1Text        "1.  Enter text to help your users to figure out how to fill in the dialog box. (80 char.)"
  728.  
  729. <:#284,11088>
  730.  
  731. Define        Number2Text        "2.  Enter the formula to calculate the answer.  For example, @AVG({{VALUE1},{{VALUE2},{{VALUE3})"
  732.  
  733. <:#284,11088>
  734.  
  735. <:#284,11088>Define        Number3Text        "3.  Enter real names for the values: (20 char)"
  736.  
  737. <:#284,11088>
  738.  
  739. <:#284,11088>
  740.  
  741. <:#284,11088>' Defines for the Define application Box
  742.  
  743. <:#284,11088>Define        Text1        "1.  Type in the name you want to appear at the top of the dialog box: (30 char.)"
  744.  
  745. <:#284,11088>Define        Text2        "2.  Name of the macro to create: "
  746.  
  747. <:#284,11088>Define        Text3        "3.  Number of variables: (1 - 6)"
  748.  
  749. <:#284,11088>
  750.  
  751. @Subhead@<:#284,11088>' Api Defines
  752.  
  753. <:#284,11088>Define EnableWindow() DllCall("user,EnableWindow,HHH", %1, %2)
  754.  
  755. <:#284,11088>Define MoveWindow() DllCall("User,MoveWindow,HHHHHHA",%1,%2,%3,%4,%5,%6)
  756.  
  757. <:#284,11088>DEFINE GetWindowRect()    DllCall("user,GetWindowRect,HHN",%1,%2)
  758.  
  759. <:#284,11088>Define ShowWindow(hWnd, stuff) DllCall("user,ShowWindow,HHH", %1, %2)
  760.  
  761. <:#284,11088>Define SetFocus() DllCall("user,SetFocus,HH",%1)
  762.  
  763. <:#284,11088>Define getsystemmetrics() dllcall("user,getsystemmetrics,HH", %1)
  764.  
  765. <:#284,11088>
  766.  
  767. <:#284,11088>
  768.  
  769. <:#284,11088>Define EM_LimitText 1045
  770.  
  771. <:#284,11088>
  772.  
  773. <:#284,11088>
  774.  
  775. <:#284,11088>Declare     FontDlg(Action, Hdlg, id)
  776.  
  777. <:#284,11088>Declare    InsertDefine(Item, Value)
  778.  
  779. <:#284,11088>Declare    DefineApp(AppName, NumberItems, MacroName, MacDesc)
  780.  
  781. <:#284,11088>Declare    Construct(Appname, NumberItems, Formula, HelpText, aValue)
  782.  
  783. <:#284,11088>Declare     Redraw(Hwnd, status)    ' 1 is no redraw 0 is repaint
  784.  
  785. <:#284,11088>Declare    StrPath(FileName)
  786.  
  787. <:#284,11088>Declare    SizeBox(hdlg, Number)
  788.  
  789. <:#284,11088>Declare FindAndReplace(Sting, FindWhat, ReplaceWith)
  790.  
  791. <:#284,11088>Declare CBDefineApp(Hdlg, id, Value)
  792.  
  793. <:#284,11088>Declare ManageList(Hdlg, id, section)
  794.  
  795. <:#284,11088>Declare RadioCall(Hdlg, id, value)
  796.  
  797. <:#284,11088>
  798.  
  799. <:#284,11088>
  800.  
  801. <:#284,11088>Declare ShowFunctions(Hdlg, id)
  802.  
  803. <:#284,11088>
  804.  
  805. <:#284,11088>
  806.  
  807. @Subhead@<:#284,11088>Function Main()
  808.  
  809. <:#284,11088>DefStr AppName, NumberItems, MacroName, MacDesc, Formula, HelpText, hWnd;
  810.  
  811. <:#284,11088>IgnoreKeyBoard(2)
  812.  
  813. <:#284,11088>Continue = True
  814.  
  815. <:#284,11088>Mac = GetRunningMacroFile$()
  816.  
  817. <:#284,11088>StepNumber = 1
  818.  
  819. <:#284,11088>Dim TextLabel(10)
  820.  
  821. <:#284,11088>AllocGlobalVar("StepNumber",1)
  822.  
  823. <:#284,11088>SetGlobalVar("StepNumber",1)
  824.  
  825. <:#284,11088>
  826.  
  827. <:#284,11088>
  828.  
  829. <:#284,11088>FontDlg(1,0,0)        ' Create a small font for the dialog boxes
  830.  
  831. <:#284,11088>
  832.  
  833. <:#284,11088>While Continue
  834.  
  835. <:#284,11088>FillEdit(1004, MainText)
  836.  
  837. <:#284,11088>FillEdit(1005,"Build1.bmt")
  838.  
  839. <:#284,11088>FillEdit(1006,"Build2.bmt")
  840.  
  841. <:#284,11088>FillEdit(1007,"Build3.bmt")
  842.  
  843. <:#284,11088>FillEdit(1000, DefineText)
  844.  
  845. <:#284,11088>FillEdit(1001, DesignText)
  846.  
  847. <:#284,11088>FillEdit(1002, RunText)
  848.  
  849. <:#284,11088>
  850.  
  851. <:#284,11088>
  852.  
  853. <:#284,11088>SetDlgCallBack(0,"{Mac}!InitMainBox")
  854.  
  855. @Outline3@<:#284,11088>DlgKeyInterrupt(112, "{mac}!DisplayHelp")
  856.  
  857. @Outline3@<:#284,11088>
  858.  
  859. <:#284,11088>Box = DialogBox(".","MainBox")
  860.  
  861. <:#284,11088>StepNumber = GetGlobalVar$("StepNumber")
  862.  
  863. <:#284,11088>If Box = 1
  864.  
  865. <:#284,11088>    If GetDialogField$(21)        ' Define the app
  866.  
  867. <:#284,11088>        If 0 = DefineApp(&AppName, &NumberItems, &MacroName, &MacDesc)
  868.  
  869. <:#284,11088>        If StepNumber = 1
  870.  
  871. <:#284,11088>            StepNumber = 2
  872.  
  873. <:#284,11088>        Endif
  874.  
  875. <:#284,11088>        Else
  876.  
  877. <:#284,11088>            'Cancelled the box
  878.  
  879. <:#284,11088>        Endif
  880.  
  881. <:#284,11088>
  882.  
  883. <:#284,11088>    Elseif GetDialogField$(22)    ' Design the ui
  884.  
  885. <:#284,11088>        If 0 = Construct(AppName, NumberItems, &Formula, &HelpText, &TextLabel)
  886.  
  887. <:#284,11088>        HourGlass(on)
  888.  
  889. <:#284,11088>        If New("_Default.sty"  1 0  )
  890.  
  891. <:#284,11088>            Redraw(&hWnd, 1)    ' Turn painting off on window
  892.  
  893. <:#284,11088>            MacroPath = StrPath(Mac)
  894.  
  895. <+@><:#284,11088>            Name = "{MacroPath}{MacroName}.SMM"
  896.  
  897. <:#284,11088>            StatusBarMsg("Please wait...Now building {Name}")
  898.  
  899. <:#284,11088>            NumDec = 2
  900.  
  901. <:#284,11088>            DialogTitle = AppName
  902.  
  903. <:#284,11088>            InsertDefine("NumDec",2)
  904.  
  905. <:#284,11088>            InsertDefine("NumberItems",NumberItems)
  906.  
  907. <:#284,11088>            InsertDefine("DialogTitle",DialogTitle)
  908.  
  909. <:#284,11088>            InsertDefine("HelpText",HelpText)
  910.  
  911. <:#284,11088>            InsertDefine("Formula",Formula)
  912.  
  913. <:#284,11088>            For t = 1 to 10
  914.  
  915. <:#284,11088>                InsertDefine("Value{t}Text",TextLabel(t))
  916.  
  917. <:#284,11088>            Next
  918.  
  919. <:#284,11088>            FileOpen("{MacroPath}BUILDER.SAM"  9 ""   )
  920.  
  921. <:#284,11088>            If SaveAs(Name  32 "{HelpText}"  ""   )
  922.  
  923. <:#284,11088>                FileClose()
  924.  
  925.                 StepNumber = 3
  926.  
  927.             Else
  928.  
  929.                 StepNumber = 2
  930.  
  931.             Endif
  932.  
  933. <:#284,11088>            ReDraw(hWnd, 0)
  934.  
  935. <:#284,11088>            StatusBarMsg("")
  936.  
  937. <:#284,11088>            HourGlass(off)
  938.  
  939. <:#284,11088>        Endif
  940.  
  941. <:#284,11088>        Else
  942.  
  943. <:#284,11088>            ' Cancelled the construction part
  944.  
  945. <:#284,11088>        Endif
  946.  
  947. <:#284,11088>    Elseif GetDialogField$(23)    ' Run the app
  948.  
  949. <:#284,11088>        Calli Name()
  950.  
  951. <:#284,11088>        StepNumber = 3
  952.  
  953. <:#284,11088>    Endif
  954.  
  955. <:#284,11088>Else
  956.  
  957. <:#284,11088>    Continue = False
  958.  
  959. <:#284,11088>Endif
  960.  
  961. <:#284,11088>SetGlobalVar("StepNumber",StepNumber)
  962.  
  963. <:#284,11088>Wend
  964.  
  965. <:#284,11088>
  966.  
  967. <:#284,11088>FontDlg(4,0,0)        ' Free the small font and destroy the object
  968.  
  969. <:#284,11088>FreeGlobalVar("StepNumber")
  970.  
  971. <:#284,11088>
  972.  
  973. <:#284,11088>
  974.  
  975. <:#284,11088>End Function
  976.  
  977. <:#284,11088>
  978.  
  979. <:#284,11088>
  980.  
  981. @Subhead@<:#284,11088>Function InitMainBox(Hdlg, id, value)
  982.  
  983. <:#284,11088>IgnoreKeyboard(2)
  984.  
  985. <:#284,11088>HourGlass(on)
  986.  
  987. <:#284,11088>For t = 1000 to 1004
  988.  
  989. <:#284,11088>    FontDlg(3, Hdlg, t)
  990.  
  991. <:#284,11088>Next
  992.  
  993. <:#284,11088>StepNumber = GetGlobalVar$("StepNumber")
  994.  
  995. <:#284,11088>Switch StepNumber
  996.  
  997. <:#284,11088>    Case 1
  998.  
  999. <:#284,11088>        StepText = ""
  1000.  
  1001. <:#284,11088>        EnableWindow(GetDlgItem(Hdlg, 22), 0)
  1002.  
  1003. <:#284,11088>        EnableWindow(GetDlgItem(Hdlg, 23),0)
  1004.  
  1005. <:#284,11088>
  1006.  
  1007. <:#284,11088>    Case 2
  1008.  
  1009. <:#284,11088>        StepText = SecondStep
  1010.  
  1011. <:#284,11088>        EnableWindow(GetDlgItem(Hdlg, 22), 1)
  1012.  
  1013. <:#284,11088>        EnableWindow(GetDlgItem(Hdlg, 23),0)
  1014.  
  1015. <:#284,11088>
  1016.  
  1017. <:#284,11088>
  1018.  
  1019. <:#284,11088>    Case 3
  1020.  
  1021. <:#284,11088>        StepText = ThirdStep
  1022.  
  1023. <:#284,11088>        EnableWindow(GetDlgItem(Hdlg, 22), 1)
  1024.  
  1025. <:#284,11088>        EnableWindow(GetDlgItem(Hdlg, 23),1)
  1026.  
  1027. <:#284,11088>EndSwitch
  1028.  
  1029. <:#284,11088>SetDlgItemText(Hdlg, 1003, StepText)
  1030.  
  1031. <:#284,11088>SetDlgItemText(Hdlg, 20 + StepNumber, 1)
  1032.  
  1033. <:#284,11088>HourGlass(off)
  1034.  
  1035. <:#284,11088>End Function
  1036.  
  1037. <:#284,11088>
  1038.  
  1039. <:#284,11088>
  1040.  
  1041. <:#284,11088>
  1042.  
  1043. <:#284,11088>
  1044.  
  1045. @Subhead@<:#284,11088>Function DefineApp(AppName, NumberItems, MacroName, MacDesc)
  1046.  
  1047. <:#284,11088>IgnoreKeyBoard(2)
  1048.  
  1049. <:#284,11088>Mac = GetRunningMacroFile$()
  1050.  
  1051. <:#284,11088>
  1052.  
  1053. <:#284,11088>
  1054.  
  1055. <:#284,11088>FillEdit(1005, WelcomeText)
  1056.  
  1057. <:#284,11088>FillEdit(1002, Text1)
  1058.  
  1059. <:#284,11088>FillEdit(1003, Text2)
  1060.  
  1061. <:#284,11088>FillEdit(1004, Text3)
  1062.  
  1063. <:#284,11088>
  1064.  
  1065. <:#284,11088>
  1066.  
  1067. <:#284,11088>FillEdit(8000, AppName)
  1068.  
  1069. <:#284,11088>FillEdit(8001, NumberItems)
  1070.  
  1071. <:#284,11088>FillEdit(8002, MacroName)
  1072.  
  1073. <:#284,11088>FillEdit(8003, MacDesc)
  1074.  
  1075. <:#284,11088>SetDlgCallBack(8002,"{Mac}!CBDefineApp")
  1076.  
  1077. <:#284,11088>SetDlgCallBack(8001,"{Mac}!CBDefineApp")
  1078.  
  1079. <:#284,11088>
  1080.  
  1081. <:#284,11088>SetDlgCallBack(0,"{Mac}!InitDefineApp")
  1082.  
  1083. @Outline3@<:#284,11088>DlgKeyInterrupt(112, "{mac}!DisplayHelp")
  1084.  
  1085. @Outline3@<:#284,11088>
  1086.  
  1087. <:#284,11088>Box = DialogBox(".","DefineApp")
  1088.  
  1089. <:#284,11088>If Box <<<;> 1
  1090.  
  1091. <:#284,11088>    Return -1
  1092.  
  1093. <:#284,11088>Endif
  1094.  
  1095. <:#284,11088>*MacroName = StrField$(GetDialogField$(8002),1,".");
  1096.  
  1097. <:#284,11088>FindAndReplace(&MacroName," ","_")    'replace space with underbar
  1098.  
  1099. <:#284,11088>*AppName = GetDialogField$(8000);
  1100.  
  1101. <:#284,11088>*NumberItems = GetDialogField$(8001);
  1102.  
  1103. <:#284,11088>*MacDesc = GetDialogField$(8003);
  1104.  
  1105. <:#284,11088>End Function
  1106.  
  1107. <:#284,11088>
  1108.  
  1109. @Subhead@<:#284,11088>Function CBDefineApp(Hdlg, id, value)
  1110.  
  1111. <:#284,11088>IgnoreKeyBoard(2)
  1112.  
  1113. <:#284,11088>MacName = GetDlgItemText(Hdlg, 8002)
  1114.  
  1115. <:#284,11088>Items = GetDlgItemText(Hdlg, 8001)
  1116.  
  1117. <:#284,11088>If Items <;>6
  1118.  
  1119. <:#284,11088>    SetDlgItemText(Hdlg, 8001, 6)
  1120.  
  1121. <:#284,11088>Endif
  1122.  
  1123. <:#284,11088>If MacName != "" and Items !="" 
  1124.  
  1125. <:#284,11088>    EnableWindow(GetDlgItem(Hdlg, 1),1)
  1126.  
  1127. <:#284,11088>Else
  1128.  
  1129. <:#284,11088>    EnableWindow(GetDlgItem(Hdlg, 1),0)
  1130.  
  1131. <:#284,11088>Endif
  1132.  
  1133. <:#284,11088>
  1134.  
  1135. <:#284,11088>End Function
  1136.  
  1137. <:#284,11088>
  1138.  
  1139. @Subhead@<:#284,11088>Function InitDefineApp(Hdlg, id, value)
  1140.  
  1141. <:#284,11088>IgnoreKeyboard(2)
  1142.  
  1143. <:#284,11088>HourGlass(on)
  1144.  
  1145. <:#284,11088>For t = 1000 to 1004
  1146.  
  1147. <:#284,11088>    FontDlg(3, Hdlg, t)
  1148.  
  1149. <:#284,11088>Next
  1150.  
  1151. <:#284,11088>FontDlg(3, Hdlg, 8000)
  1152.  
  1153. <:#284,11088>FontDlg(3, Hdlg, 8001)
  1154.  
  1155. <:#284,11088>FontDlg(3, Hdlg, 8002)
  1156.  
  1157. <:#284,11088>AppSendMessage(GetDlgItem(Hdlg, 8000),EM_LimitText, 30,"")
  1158.  
  1159. <:#284,11088>AppSendMessage(GetdlgItem(Hdlg, 8002),EM_LimitText, 8,"")
  1160.  
  1161. <:#284,11088>AppSendMessage(GetdlgItem(Hdlg, 8001),EM_LimitText, 1,"")
  1162.  
  1163. <:#284,11088>SetFocus(GetDlgItem(Hdlg, 8000))
  1164.  
  1165. <:#284,11088>CBDefineApp(Hdlg, id, value)
  1166.  
  1167. <:#284,11088>HourGlass(off)
  1168.  
  1169. <:#284,11088>End Function
  1170.  
  1171. <:#284,11088>
  1172.  
  1173. <:#284,11088>
  1174.  
  1175. <:#284,11088>
  1176.  
  1177. <:#284,11088>
  1178.  
  1179. @Subhead@<:#284,11088>Function Construct(AppName, NumberItems, Formula, HelpText, ValueText)
  1180.  
  1181. <:#284,11088>IgnoreKeyBoard(2)
  1182.  
  1183. <:#284,11088>Mac = GetRunningMacroFile$()
  1184.  
  1185. <:#284,11088>AllocglobalVar("NumberItems",1)
  1186.  
  1187. <:#284,11088>SetglobalVar("NumberItems",NumberItems)
  1188.  
  1189. <:#284,11088>
  1190.  
  1191. <:#284,11088>FillEdit(1020, Number1Text)
  1192.  
  1193. <:#284,11088>FillEdit(1021, Number2Text)
  1194.  
  1195. <:#284,11088>FillEdit(1022, Number3Text)
  1196.  
  1197. <:#284,11088>
  1198.  
  1199. <:#284,11088>
  1200.  
  1201. <:#284,11088>FillEdit(8060, Formula)
  1202.  
  1203. <:#284,11088>FillEdit(8050, HelpText)
  1204.  
  1205. <:#284,11088>For number = 1 to NumberItems
  1206.  
  1207. <:#284,11088>    FillEdit(8000 + Number, *ValueText(Number));
  1208.  
  1209. <:#284,11088>Next
  1210.  
  1211. <:#284,11088>
  1212.  
  1213. <:#284,11088>SetDlgCallBack(0,"{Mac}!InitConstruct")
  1214.  
  1215. @Outline3@<:#284,11088>SetDlgCallBack(22,"{Mac}!FunButton")
  1216.  
  1217. @Outline3@<:#284,11088>DlgKeyInterrupt(112, "{mac}!DisplayHelp")
  1218.  
  1219. @Outline3@<:#284,11088>
  1220.  
  1221. <:#284,11088>Box = DialogBox(".","Construct")
  1222.  
  1223. <:#284,11088>FreeGlobalVar("NumberItems")
  1224.  
  1225. <:#284,11088>If Box<<<;>1
  1226.  
  1227. <:#284,11088>    Return -1
  1228.  
  1229. <:#284,11088>Endif
  1230.  
  1231. <:#284,11088>*Formula = GetDialogField$(8060);
  1232.  
  1233. <:#284,11088>FindAndReplace(&Formula," ","")        ' remove all spaces
  1234.  
  1235. <:#284,11088>FindAndReplace(&Formula,Chr$(34),"")    ' remove quotes
  1236.  
  1237. <:#284,11088>*HelpText = GetdialogField$(8050);
  1238.  
  1239. <:#284,11088>For t = 1 to NumberItems;
  1240.  
  1241. <:#284,11088>    *ValueText(t) = GetDialogField$(8000 + t)
  1242.  
  1243. <:#284,11088>Next
  1244.  
  1245. <:#284,11088>
  1246.  
  1247. <:#284,11088>End Function
  1248.  
  1249. <:#284,11088>
  1250.  
  1251. <:#284,11088>
  1252.  
  1253. @Subhead@<:#284,11088>Function InitConstruct(Hdlg, id, value)
  1254.  
  1255. <:#284,11088>IgnoreKeyBoard(2)
  1256.  
  1257. <:#284,11088>HourGlass(on)
  1258.  
  1259. <:#284,11088>NumberItems = GetGlobalVar$("NumberItems")
  1260.  
  1261. <:#284,11088>
  1262.  
  1263. <:#284,11088>
  1264.  
  1265. <:#284,11088>For Id = 1 to 9
  1266.  
  1267. <:#284,11088>    FontDlg(3, Hdlg, Id + 1000)
  1268.  
  1269. <:#284,11088>    FontDlg(3, Hdlg, id + 8000)
  1270.  
  1271. <:#284,11088>    AppSendMessage(GetDlgItem(Hdlg, id + 8000),Em_LimitText, 20, "")
  1272.  
  1273. <:#284,11088>    If Id <;> NumberItems
  1274.  
  1275. <:#284,11088>        ShowWindow(GetDlgItem(Hdlg, id + 1000), 0)
  1276.  
  1277. <:#284,11088>        ShowWindow(GetDlgItem(Hdlg, id + 8000), 0)
  1278.  
  1279. <:#284,11088>    Endif
  1280.  
  1281. <:#284,11088>Next
  1282.  
  1283. <:#284,11088>FontDlg(3, Hdlg, 1020)
  1284.  
  1285. <:#284,11088>FontDlg(3, Hdlg, 1021)
  1286.  
  1287. <:#284,11088>FontDlg(3, Hdlg, 1022)
  1288.  
  1289. <:#284,11088>FontDlg(3, Hdlg, 8050)
  1290.  
  1291. <:#284,11088>FontDlg(3, Hdlg, 8060)
  1292.  
  1293. <:#284,11088>SetFocus(GetDlgItem(Hdlg, 8050))
  1294.  
  1295. <:#284,11088>AppSendMessage(GetDlgItem(Hdlg, 8050),Em_LimitText,80,"")
  1296.  
  1297. <:#284,11088>SizeBox(hdlg, NumberItems)
  1298.  
  1299. <:#284,11088>HourGlass(off)
  1300.  
  1301. <:#284,11088>End Function
  1302.  
  1303. <:#284,11088>
  1304.  
  1305. <:#284,11088>
  1306.  
  1307. @Subhead@<:#284,11088>Function SizeBox(Hdlg, NumberEditControls)
  1308.  
  1309. <:#284,11088>Define    Repaint 1
  1310.  
  1311. <:#284,11088>IgnoreKeyBoard(2)
  1312.  
  1313. Stat = GetSystemMetrics(4)
  1314.  
  1315. Dim Rect(4)
  1316.  
  1317. <:#284,11088>GetWindowRect(Hdlg, &Rect)
  1318.  
  1319. <:#284,11088>DeltaX = Rect(3) - Rect(1);
  1320.  
  1321. If Stat = 20
  1322.  
  1323.     DeltaY = (22 * NumberEditControls) + 200;
  1324.  
  1325. Else
  1326.  
  1327.     DeltaY = (26 * NumberEditControls) + 250;
  1328.  
  1329. Endif
  1330.  
  1331. MoveWindow(Hdlg, Rect(1), Rect(2), DeltaX, DeltaY, Repaint)
  1332.  
  1333. <:#284,11088>End Function
  1334.  
  1335. <:#284,11088>
  1336.  
  1337. <:#284,11088>
  1338.  
  1339. @Subhead@<:#284,11088>function DisplayHelp()
  1340.  
  1341. @Outline2@<:#284,11088>' two defines needed for help.  The help name and panel number are defined above
  1342.  
  1343. @Outline2@<:#284,11088>define FindWindowa() DllCall("user,FindWindow,HCC", %1, %2)
  1344.  
  1345. @Outline2@<:#284,11088>define WinHelpa(hWnd, file, cmd, ptr)    DllCall("user,WinHelp,HHCHJ", %1, %2, %3, %4)
  1346.  
  1347. @Outline2@<:#284,11088>prohWnd = FindWindowa("AmiProWndA", 0)
  1348.  
  1349. @Outline2@<:#284,11088>helpfile = strcat$(GetAmiDirectory$(), "HelpPack.hlp")
  1350.  
  1351. @Outline2@<:#284,11088>PanelNum= 105 
  1352.  
  1353. @Outline2@<:#284,11088>WinHelpa(prohWnd, helpfile, 0x0001, Panelnum)
  1354.  
  1355. @Outline2@<:#284,11088>end function
  1356.  
  1357. @Subhead@<:#284,11088>
  1358.  
  1359. <:#284,11088>
  1360.  
  1361. @Subhead@<:#284,11088>Function FunButton(Hdlg, id, value)
  1362.  
  1363. <:#284,11088>ShowFunctions(Hdlg, 8060)
  1364.  
  1365. <:#284,11088>End Function
  1366.  
  1367. <:#284,11088>
  1368.  
  1369. <:#284,11088>
  1370.  
  1371. <:#284,11088>
  1372.  
  1373. <:#284,11088>
  1374.  
  1375. <:#284,11088>
  1376.  
  1377. <:#284,11088>
  1378.  
  1379. @Subhead@<:#284,11088>Function FindAndReplace(String, Findwhat, Replacewith)
  1380.  
  1381. <:#284,11088>DefStr Location;
  1382.  
  1383. <:#284,11088>OffSet = 0
  1384.  
  1385. <:#284,11088>While 0 != Assign(&Location, Instr(OffSet, String, FindWhat))
  1386.  
  1387. <:#284,11088>    BeforeLocation = Left$(String, Location - 1)
  1388.  
  1389. <:#284,11088>    AfterLocation = Right$(String, Len(String) - Location);
  1390.  
  1391. <:#284,11088>    *String = StrCat$(BeforeLocation, ReplaceWith, AfterLocation)
  1392.  
  1393. <:#284,11088>Wend
  1394.  
  1395. <:#284,11088>End Function
  1396.  
  1397. <:#284,11088>
  1398.  
  1399. <:#284,11088>
  1400.  
  1401. <:#284,11088>
  1402.  
  1403. <:#284,11088>
  1404.  
  1405. @Subhead@<:#284,11088>Function Redraw(Hwnd, Param)
  1406.  
  1407. @Outline2@<:#284,11088>Define SendMessageDM(hwnd, message, wparam, lparao) dllcall("user,SendMessage,JHHHJ", %1, %2, %3, %4)
  1408.  
  1409. @Outline2@<:#284,11088>Define InvalidateRectDM(hwnd, stuff, H) DllCall("user,InvalidateRect,HHFH", %1, %2, %3)
  1410.  
  1411. <:#284,11088>DEFINE GetClientRectDM()          DLLCALL("User,GetClientRect,HHN",%1,%2)
  1412.  
  1413. @Outline2@<:#284,11088>define WM_SETREDRAWDM    0x000B
  1414.  
  1415. <:#284,11088>Define        GetActiveTextWinDM()        GetInfo(267)
  1416.  
  1417. <:#284,11088>
  1418.  
  1419. <:#284,11088>IgnoreKeyBoard(2)
  1420.  
  1421. @Outline2@<:#284,11088>
  1422.  
  1423. @Outline2@<:#284,11088>Dim A(4)
  1424.  
  1425. @Outline2@<:#284,11088>switch Param
  1426.  
  1427. @Outline2@<:#284,11088>    Case 1;
  1428.  
  1429. @Outline2@<:#284,11088>        *hWnd = GetActiveTextWinDM()
  1430.  
  1431. @Outline2@<:#284,11088>        SendMessageDM(hWnd, WM_SETREDRAWDM, 0, "")
  1432.  
  1433. @Outline2@<:#284,11088>        Return hWnd
  1434.  
  1435. @Outline2@<:#284,11088>    Case 0
  1436.  
  1437. @Outline2@<:#284,11088>        SendMessageDM(hWnd, WM_SETREDRAWDM,1,"")
  1438.  
  1439. @Outline2@<:#284,11088>        GetClientRectDM(hWnd, &A)
  1440.  
  1441. @Outline2@<:#284,11088>        InvalidateRectDM(hWnd, &A,1)
  1442.  
  1443. @Outline2@<:#284,11088>    Default
  1444.  
  1445. @Outline2@<:#284,11088>        ' Didn't understand
  1446.  
  1447. @Outline2@<:#284,11088>EndSwitch
  1448.  
  1449. @Outline2@<:#284,11088>End Function
  1450.  
  1451. <:#284,11088>
  1452.  
  1453. <:#284,11088>
  1454.  
  1455. <:#284,11088>
  1456.  
  1457. <:#284,11088>
  1458.  
  1459. @Subhead@function strpath(filename)
  1460.  
  1461. <:#284,11088>defstr char;
  1462.  
  1463. <:#284,11088>Length = len(FileName)
  1464.  
  1465. <:#284,11088>WHILE "\" != Assign(&Char, MID$(FileName, Length, 1))
  1466.  
  1467. <:#284,11088>    Length = Length - 1
  1468.  
  1469. <:#284,11088>WEND
  1470.  
  1471. <:#284,11088>InFileName = Right$(FileName, (len(FileName) - Length))
  1472.  
  1473. <:#284,11088>InDir = Left$(FileName, Length - 1) 
  1474.  
  1475. <:#284,11088>if right$(indir, 1) <<<;> "\"
  1476.  
  1477. <:#284,11088>    indir = strcat$(indir, "\")
  1478.  
  1479. <:#284,11088>endif
  1480.  
  1481. <:#284,11088>return indir
  1482.  
  1483. <:#284,11088>end function
  1484.  
  1485. <:#284,11088>
  1486.  
  1487. <:#284,11088>
  1488.  
  1489. @Subhead@<:#284,11088>Function InsertDefine(Item, Value)
  1490.  
  1491. <:#284,11088>Quote = Chr$(34)
  1492.  
  1493. <:#284,11088>Type ("Define<[>Tab]{Item}<[>Tab]{Quote}{Value}{Quote}<[>Enter]")
  1494.  
  1495. <:#284,11088>End Function
  1496.  
  1497. <:#284,11088>
  1498.  
  1499. <:#284,11088>
  1500.  
  1501. @Subhead@<:#284,11088>Function FontDlg(Action, Hdlg, id)
  1502.  
  1503. <:#284,11088>' 1    Create a font and allocvar
  1504.  
  1505. <:#284,11088>' 2    Return the handle of the create font 
  1506.  
  1507. <:#284,11088>' 3    Set the id specified to the font
  1508.  
  1509. <:#284,11088>' 4    Freeglobalvar and delete created object
  1510.  
  1511. <:#284,11088>
  1512.  
  1513. @Outline2@<:#568,11088>define    CreateFontDLG()        DllCall("gdi,CreateFont,HHHHHHHHHHHHHHC", %1, %2, %3, %4, %5, %6, %7, %8, %9, %10, %11, %12, %13, %14)
  1514.  
  1515. @Outline2@<:#284,11088>define    DeleteObjectDLG(handle)    DllCall("gdi,DeleteObject,HH", %1)
  1516.  
  1517. @Outline2@<:#568,11088>define    SendMessageDLG(hwnd, msg, wpara, lparm)    DllCall("user,SendMessage,HHHHJ", %1, %2, %3, %4)
  1518.  
  1519. @Outline2@<:#284,11088>
  1520.  
  1521. @Outline2@<:#284,11088>
  1522.  
  1523. <:#284,11088>Switch Action
  1524.  
  1525. <:#284,11088>    Case 1    ' Create the font and store it
  1526.  
  1527. @Outline2@<:#284,11088>        Font = CreateFontDLG(13, 0, 0, 0, 400, 0, 0, 0, 0, 0, 0, 0, 32, "Helv")
  1528.  
  1529. <:#284,11088>        AllocGlobalVar("FontHandle",1)
  1530.  
  1531. <:#284,11088>        If Font
  1532.  
  1533. <:#284,11088>            SetGlobalVar("FontHandle",Font)
  1534.  
  1535. <:#284,11088>            Return Font
  1536.  
  1537. <:#284,11088>        Else
  1538.  
  1539. <:#284,11088>            Return 0;    ' no font
  1540.  
  1541. <:#284,11088>        Endif
  1542.  
  1543. <:#284,11088>        Break;
  1544.  
  1545. <:#284,11088>    Case 2    ' Return the handle to the font
  1546.  
  1547. <:#284,11088>        Handle = GetGlobalVar$("FontHandle")
  1548.  
  1549. <:#284,11088>        If Handle 
  1550.  
  1551. <:#284,11088>            Return Handle
  1552.  
  1553. <:#284,11088>        Else
  1554.  
  1555. <:#284,11088>            Return 0
  1556.  
  1557. <:#284,11088>        Endif
  1558.  
  1559. <:#284,11088>
  1560.  
  1561. <:#284,11088>    Case 3    ' Set the id to the font
  1562.  
  1563. <:#284,11088>        Handle = GetGlobalVar$("FontHandle")
  1564.  
  1565. <:#284,11088>        If Handle 
  1566.  
  1567. <:#284,11088>            IdControl = GetDlgITem(Hdlg, id)
  1568.  
  1569. <:#284,11088>            SendMessageDlg(idControl, 0x30, Handle, 0)
  1570.  
  1571. <:#284,11088>            Return 1
  1572.  
  1573. <:#284,11088>        Else
  1574.  
  1575. <:#284,11088>            Return 0
  1576.  
  1577. <:#284,11088>        Endif
  1578.  
  1579. <:#284,11088>        Break;        
  1580.  
  1581. <:#284,11088>        
  1582.  
  1583. <:#284,11088>    Case 4    ' Delete the font and clear the var
  1584.  
  1585. <:#284,11088>        Handle = GetGlobalVar$("FontHandle")
  1586.  
  1587. <:#284,11088>        If Handle
  1588.  
  1589. <:#284,11088>            DeleteObjectDLG(Handle)
  1590.  
  1591. <:#284,11088>            Stat = 1    
  1592.  
  1593. <:#284,11088>        Else
  1594.  
  1595. <:#284,11088>            Stat = 0
  1596.  
  1597. <:#284,11088>        Endif
  1598.  
  1599. <:#284,11088>        FreeGlobalVar("FontHandle")
  1600.  
  1601. <:#284,11088>        Return Stat        
  1602.  
  1603. <:#284,11088>    Default
  1604.  
  1605. <:#284,11088>        Message("Fontdlg received an invalid parameter {Action}")
  1606.  
  1607. <:#284,11088>EndSwitch    
  1608.  
  1609. <:#284,11088>
  1610.  
  1611. <:#284,11088>End Function
  1612.  
  1613. @Subhead@<:#284,11088>
  1614.  
  1615. <:#284,11088>
  1616.  
  1617. @Subhead@<:#284,11088>Function ShowFunctions(Hdlg, Id)
  1618.  
  1619. <:#284,11088>Define    EnableWindowIns()    DllCall("User,EnableWindow,AHA",%1,%2)
  1620.  
  1621. <:#284,11088>Define SetFocusIns() DllCall("user,SetFocus,HH",%1)
  1622.  
  1623. <:#284,11088>Define        LB_RESETCONTENT        0x405
  1624.  
  1625. <:#284,11088>Define        ExID        8010
  1626.  
  1627. <:#284,11088>Define        DescID        1001
  1628.  
  1629. <:#284,11088>Define        FinancialRadio    20
  1630.  
  1631. <:#284,11088>Define        StatRadio    21
  1632.  
  1633. <:#284,11088>Define        MathRadio    22
  1634.  
  1635. <:#284,11088>Define        LogicRadio    23
  1636.  
  1637. <:#284,11088>Define        FinanSect    "Financial"
  1638.  
  1639. <:#284,11088>Define        StatSect    "Statistical"
  1640.  
  1641. <:#284,11088>Define        MathSect    "Mathematical"
  1642.  
  1643. <:#284,11088>Define        LogicSect    "Logical"
  1644.  
  1645. <:#284,11088>
  1646.  
  1647. <:#284,11088>
  1648.  
  1649. <:#284,11088>Define        IniName        "AmiCalc.ini"
  1650.  
  1651. <:#284,11088>Define        Delimiter    "~"
  1652.  
  1653. <:#284,11088>
  1654.  
  1655. <:#284,11088>
  1656.  
  1657. <:#284,11088>EnableWindowIns(Hdlg,0)
  1658.  
  1659. <:#284,11088>Mac = GetRunningMacroFile$()
  1660.  
  1661. <:#284,11088>SetDlgCallBack(FinancialRadio,"{Mac}!RadioCall")
  1662.  
  1663. <:#284,11088>SetDlgCallBack(StatRadio,"{Mac}!RadioCall")
  1664.  
  1665. <:#284,11088>SetDlgCallBack(MathRadio,"{Mac}!RadioCall")
  1666.  
  1667. <:#284,11088>SetDlgCallBack(LogicRadio,"{Mac}!RadioCall")
  1668.  
  1669. <:#284,11088>SetDlgCallBack(0,"{Mac}!InitCall")
  1670.  
  1671. <:#284,11088>SetDlgCallBack(9000,"{Mac}!RadioCall")
  1672.  
  1673. @Outline3@<:#284,11088>DlgKeyInterrupt(112, "{mac}!DisplayHelp")
  1674.  
  1675. <:#284,11088>FillEdit(20,1)
  1676.  
  1677. <:#284,11088>Box = DialogBox(".","More")
  1678.  
  1679. <:#284,11088>If Box = 1
  1680.  
  1681. <:#284,11088>    ' need to paste to the edit box
  1682.  
  1683. <:#284,11088>    Text = GetDlgItemText(Hdlg, Id)
  1684.  
  1685. <:#284,11088>    Example = GetDialogField$(ExID)
  1686.  
  1687. <:#284,11088>    NewText = StrCat$(Text, Example)
  1688.  
  1689. <:#284,11088>    SetDlgItemText(Hdlg, Id, NewText)
  1690.  
  1691. <:#284,11088>Endif
  1692.  
  1693. <:#284,11088>EnableWindowIns(Hdlg,1)
  1694.  
  1695. <:#284,11088>SetFocusIns(GetDlgItem(Hdlg, Id))
  1696.  
  1697. <:#284,11088>End Function
  1698.  
  1699. <:#284,11088>
  1700.  
  1701. <:#284,11088>
  1702.  
  1703. @Subhead@<:#284,11088>Function InitCall(Hdlg, id, value)
  1704.  
  1705. <:#284,11088>IgnoreKeyBoard(2)
  1706.  
  1707. <:#284,11088>
  1708.  
  1709. <:#284,11088>FontDlg(3,Hdlg, DescID)
  1710.  
  1711. <:#284,11088>FontDlg(3, Hdlg, ExID)
  1712.  
  1713. <:#284,11088>
  1714.  
  1715. <:#284,11088>
  1716.  
  1717. <:#284,11088>ManageList(Hdlg, 9000, FinanSect)
  1718.  
  1719. <:#284,11088>Key= GetDlgItemText(Hdlg, 9000)
  1720.  
  1721. <:#284,11088>FullText  = GetProfileString$(FinanSect,Key,IniName)
  1722.  
  1723. <:#284,11088>Example = StrField$(FullText, 2, Delimiter)
  1724.  
  1725. <:#284,11088>Descx = StrField$(FullText, 1, Delimiter)
  1726.  
  1727. <:#284,11088>SetDlgITemText(Hdlg, ExID,Example)
  1728.  
  1729. <:#284,11088>SetDlgItemText(hdlg, DescID, Descx)
  1730.  
  1731. <:#284,11088>End Function
  1732.  
  1733. <:#284,11088>
  1734.  
  1735. <:#284,11088>
  1736.  
  1737. @Subhead@<:#284,11088>Function RadioCall(hdlg, id, value)
  1738.  
  1739. <:#284,11088>IgnoreKeyBoard(2)
  1740.  
  1741. <:#284,11088>If GetDlgItemText(Hdlg, FinancialRadio)
  1742.  
  1743. <:#284,11088>    Section = FinanSect
  1744.  
  1745. <:#284,11088>ElseIf GetDlgItemText(Hdlg, MathRadio)
  1746.  
  1747. <:#284,11088>    Section = MathSect
  1748.  
  1749. <:#284,11088>ElseIf GetDlgITemText(hdlg, StatRadio)
  1750.  
  1751. <:#284,11088>    Section = StatSect
  1752.  
  1753. <:#284,11088>ElseIf GetDlgItemText(hdlg, LogicRadio)
  1754.  
  1755. <:#284,11088>    Section = LogicSect
  1756.  
  1757. <:#284,11088>Endif
  1758.  
  1759. <:#284,11088>
  1760.  
  1761. <:#284,11088>Switch Id
  1762.  
  1763. <:#284,11088>    Case 9000
  1764.  
  1765. <:#284,11088>        
  1766.  
  1767. <:#284,11088>        ' this is for the list box
  1768.  
  1769. <:#284,11088>        Key= GetDlgItemText(Hdlg, 9000)
  1770.  
  1771. <:#284,11088>        FullText  = GetProfileString$(Section,Key,IniName)
  1772.  
  1773. <:#284,11088>        Example = StrField$(FullText, 2, Delimiter)
  1774.  
  1775. <:#284,11088>        Descx = StrField$(FullText, 1, Delimiter)
  1776.  
  1777. <:#284,11088>        SetDlgITemText(Hdlg, ExID,Example)
  1778.  
  1779. <:#284,11088>        SetDlgItemText(hdlg, DescID, Descx)
  1780.  
  1781. <:#284,11088>        Break;
  1782.  
  1783. <:#284,11088>
  1784.  
  1785. <:#284,11088>    Default
  1786.  
  1787. <:#284,11088>        ' this will be for any radio button
  1788.  
  1789. <:#284,11088>        ManageList(Hdlg, 9000, Section)
  1790.  
  1791. <:#284,11088>        Key= GetDlgItemText(Hdlg, 9000)
  1792.  
  1793. <:#284,11088>        FullText  = GetProfileString$(Section,Key,IniName)
  1794.  
  1795. <:#284,11088>        Example = StrField$(FullText, 2, Delimiter)
  1796.  
  1797. <:#284,11088>        Descx = StrField$(FullText, 1, Delimiter)
  1798.  
  1799. <:#284,11088>        SetDlgITemText(Hdlg, ExID,Example)
  1800.  
  1801. <:#284,11088>        SetDlgItemText(hdlg, DescID, Descx)
  1802.  
  1803. <:#284,11088>        Break;
  1804.  
  1805. <:#284,11088>
  1806.  
  1807. <:#284,11088>EndSwitch
  1808.  
  1809. <:#284,11088>
  1810.  
  1811. <:#284,11088>
  1812.  
  1813. <:#284,11088>End Function
  1814.  
  1815. <:#284,11088>
  1816.  
  1817. <:#284,11088>
  1818.  
  1819. @Subhead@<:#284,11088>Function ManageList(Hdlg, id, Section)
  1820.  
  1821. <:#284,11088>DefStr KeyName;
  1822.  
  1823. <:#284,11088>AppSendMessage(GetDlgItem(Hdlg, 9000),LB_RESETCONTENT,0,0)
  1824.  
  1825. <:#284,11088>AllKeys = GetProfileString$(Section,0,IniName)
  1826.  
  1827. <:#284,11088>Field = 1
  1828.  
  1829. <:#284,11088>While -1 != Assign(&KeyName, StrField$(AllKeys, Field, "~"))
  1830.  
  1831. <:#284,11088>    If KeyName <;>""
  1832.  
  1833. <:#284,11088>        SetDlgItemText(Hdlg, 9000, KeyName)
  1834.  
  1835. <:#284,11088>    Endif
  1836.  
  1837. <:#284,11088>    Field = Field + 1
  1838.  
  1839. <:#284,11088>Wend
  1840.  
  1841. <:#284,11088>End function
  1842.  
  1843. <:#284,11088>
  1844.  
  1845. <:#284,11088>
  1846.  
  1847. <:#284,11088>
  1848.  
  1849. <:#284,11088>
  1850.  
  1851. <:#284,11088>DIALOG    More
  1852.  
  1853. <:#284,11088>-2134376448    13    61    28    187    118    ""    "AmiDialog"    "More @Functions"
  1854.  
  1855. <:#284,11088>FONT    8    "Helv"
  1856.  
  1857. <:#284,11088>7    12    50    11    20    1342242825    "button"    "&Financial"    0 
  1858.  
  1859. <:#284,11088>7    24    50    11    21    1342242825    "button"    "&Statistical"    0 
  1860.  
  1861. <:#284,11088>7    35    54    11    22    1342242825    "button"    "&Mathematical"    0 
  1862.  
  1863. <:#284,11088>7    46    50    11    23    1342242825    "button"    "&Logical"    0 
  1864.  
  1865. <:#284,11088>79    15    58    40    9000    1352728579    "listbox"    ""    0 
  1866.  
  1867. <:#284,11088>7    57    176    24    30    1342308359    "button"    "Example"    0 
  1868.  
  1869. <:#284,11088>7    83    176    32    31    1342308359    "button"    "Description"    0 
  1870.  
  1871. <:#284,11088>13    68    148    10    8010    1342177280    "static"    "text"    0 
  1872.  
  1873. <:#284,11088>13    93    158    20    1001    1342177280    "static"    "text"    0 
  1874.  
  1875. <:#284,11088>4    3    44    10    1000    1342177280    "static"    "Categories:"    0 
  1876.  
  1877. <:#284,11088>78    3    40    10    1002    1342177280    "static"    "@Functions:"    0 
  1878.  
  1879. <:#284,11088>143    3    40    14    1    1342373889    "button"    "Insert"    0 
  1880.  
  1881. <:#284,11088>143    19    40    14    2    1342373888    "button"    "Cancel"    0 
  1882.  
  1883. <:#284,11088>END DIALOG
  1884.  
  1885. <:#284,11088>
  1886.  
  1887. <:#284,11088>
  1888.  
  1889. <:#284,11088>
  1890.  
  1891. <:#284,11088>
  1892.  
  1893. <:#284,11088>
  1894.  
  1895. <:#284,11088>
  1896.  
  1897. <:#284,11088>
  1898.  
  1899. <:#284,11088>DIALOG    DefineApp
  1900.  
  1901. <:#284,11088>-2134376448    8    60    47    183    67    ""    "AmiDialog"    "Define Application"
  1902.  
  1903. <:#284,11088>FONT    8    "Helv"
  1904.  
  1905. <:#284,11088>139    3    40    14    1    1342373889    "button"    "OK"    0 
  1906.  
  1907. <:#284,11088>139    19    40    14    2    1342373888    "button"    "Cancel"    0 
  1908.  
  1909. <:#284,11088>11    23    119    12    8000    1350631552    "edit"    ""    0 
  1910.  
  1911. <:#284,11088>93    38    37    12    8002    1350631552    "edit"    ""    0 
  1912.  
  1913. <:#284,11088>93    52    16    12    8001    1350631552    "edit"    ""    0 
  1914.  
  1915. <:#284,11088>4    4    125    16    1002    1342177280    "static"    "AppName"    0 
  1916.  
  1917. <:#284,11088>4    40    88    10    1003    1342177280    "static"    "NumFields"    0 
  1918.  
  1919. <:#284,11088>4    54    88    10    1004    1342177280    "static"    "MacName"    0 
  1920.  
  1921. <:#284,11088>END DIALOG
  1922.  
  1923. <:#284,11088>
  1924.  
  1925. <:#284,11088>
  1926.  
  1927. <:#284,11088>
  1928.  
  1929. DIALOG    Construct
  1930.  
  1931. -2134376448    20    68    16    168    188    ""    "AmiDialog"    "Design Dialog Box"
  1932.  
  1933. FONT    8    "Helv"
  1934.  
  1935. 124    3    40    14    1    1342373889    "button"    "OK"    0 
  1936.  
  1937. 124    19    40    14    3    1342373888    "button"    "Cancel"    0 
  1938.  
  1939. 113    35    51    14    22    1342373888    "button"    "@&Functions..."    0 
  1940.  
  1941. 6    24    101    22    8050    1350631428    "edit"    ""    0 
  1942.  
  1943. 5    68    158    24    8060    1350631428    "edit"    ""    0 
  1944.  
  1945. 6    3    115    20    1020    1342177280    "static"    "Help text for the application:"    0 
  1946.  
  1947. 5    50    146    16    1021    1342177280    "static"    "Formula for the application"    0 
  1948.  
  1949. 79    104    66    12    8001    1350631552    "edit"    ""    0 
  1950.  
  1951. 79    118    66    12    8002    1350631552    "edit"    ""    0 
  1952.  
  1953. 79    132    66    12    8003    1350631552    "edit"    ""    0 
  1954.  
  1955. 20    107    45    10    1001    1342177280    "static"    "Label for value1"    0 
  1956.  
  1957. 20    121    45    10    1002    1342177280    "static"    "Label for value2"    0 
  1958.  
  1959. 20    135    45    10    1003    1342177280    "static"    "Label for value3"    0 
  1960.  
  1961. 5    94    127    10    1022    1342177280    "static"    "text"    0 
  1962.  
  1963. 79    146    66    12    8004    1350631552    "edit"    ""    0 
  1964.  
  1965. 79    160    66    12    8005    1350631552    "edit"    ""    0 
  1966.  
  1967. 79    176    66    12    8006    1350631552    "edit"    ""    0 
  1968.  
  1969. 20    149    45    10    1004    1342177280    "static"    "Label for value4"    0 
  1970.  
  1971. 20    163    45    10    1005    1342177280    "static"    "Label for value5"    0 
  1972.  
  1973. 20    177    45    10    1006    1342177280    "static"    "Label for value6"    0 
  1974.  
  1975. END DIALOG
  1976.  
  1977.  
  1978.  
  1979. <:#284,11088>
  1980.  
  1981. <:#284,11088>
  1982.  
  1983. <:#284,11088>DIALOG    MainBox
  1984.  
  1985. <:#284,11088>-2134376448    13    60    38    197    113    ""    "AmiDialog"    "Calculation Application Builder"
  1986.  
  1987. <:#284,11088>FONT    8    "Helv"
  1988.  
  1989. <:#284,11088>154    2    40    14    1    1342373889    "button"    "OK"    0 
  1990.  
  1991. <:#284,11088>154    18    40    14    2    1342373888    "button"    "Cancel"    0 
  1992.  
  1993. <:#568,11088>36    37    120    10    21    1342242825    "button"    "&Define the calculation application"    0 
  1994.  
  1995. <:#568,11088>36    63    156    10    22    1342242825    "button"    "De&sign the user interface for the application"    0 
  1996.  
  1997. <:#568,11088>36    89    113    10    23    1342242825    "button"    "&Run the calculation application"    0 
  1998.  
  1999. <:#284,11088>48    47    140    10    1000    1342177280    "static"    "text"    0 
  2000.  
  2001. <:#284,11088>48    73    143    10    1001    1342177280    "static"    "text"    0 
  2002.  
  2003. <:#284,11088>48    99    148    10    1002    1342177280    "static"    "text"    0 
  2004.  
  2005. <:#284,11088>38    19    80    10    1003    1342177280    "static"    "text"    0 
  2006.  
  2007. <:#284,11088>8    2    134    16    1004    1342177280    "static"    "text"    0 
  2008.  
  2009. <:#284,11088>4    23    28    23    1005    1342177290    "static"    "text"    0 
  2010.  
  2011. <:#284,11088>4    51    28    23    1006    1342177290    "static"    "text"    0 
  2012.  
  2013. <:#284,11088>4    78    28    23    1007    1342177290    "static"    "text"    0 
  2014.  
  2015. <:#284,11088>END DIALOG
  2016.  
  2017. >
  2018.  
  2019. [Embedded]
  2020. 00032843
  2021. >
  2022. [macsum] 23
  2023. Main 0 0 18 59
  2024. InitMainBox 1694 3 4 146
  2025. DefineApp 2489 4 3 178
  2026. CBDefineApp 3229 3 3 210
  2027. InitDefineApp 3540 3 2 225
  2028. Construct 4016 5 5 245
  2029. InitConstruct 4993 3 2 282
  2030. SizeBox 5741 2 5 309
  2031. DisplayHelp 6098 0 4 325
  2032. FunButton 6284 3 1 336
  2033. FindAndReplace 6339 3 5 345
  2034. Redraw 6591 2 2 358
  2035. strpath 6933 1 5 385
  2036. InsertDefine 7254 2 2 400
  2037. FontDlg 7337 3 5 406
  2038. ShowFunctions 8183 2 6 464
  2039. InitCall 8701 3 5 507
  2040. RadioCall 8996 3 6 524
  2041. ManageList 9719 3 4 565
  2042. More 9991 0 -1 581
  2043. DefineApp 10738 0 -1 605
  2044. Construct 11207 0 -1 620
  2045. MainBox 12355 0 -1 648
  2046. [macse]
  2047. 14 Main
  2048. 0 32 2
  2049. 5 1
  2050. 8 8
  2051. 0 802
  2052. 13
  2053. 8 9
  2054. 5 1
  2055. 8 10
  2056. 5 10
  2057. 21 11 [X]
  2058. 0 271 "StepNumber" 1
  2059. 0 264 "StepNumber" 1
  2060. 16 FontDlg 1 0 0
  2061. 6 8
  2062. 11 00001644
  2063. 0 31 1004 "There are three easy steps to creating a custom calculation application."
  2064. 0 31 1005 "Build1.bmt"
  2065. 0 31 1006 "Build2.bmt"
  2066. 0 31 1007 "Build3.bmt"
  2067. 0 31 1000 "(What it is called, how many variables, etc...)"
  2068. 0 31 1001 "(What are the variable names and formula)"
  2069. 0 31 1002 "(Run the application)"
  2070. 0 41 0 "{9}!InitMainBox"
  2071. 0 47 112 "{9}!DisplayHelp"
  2072. 0 26 "." "MainBox"
  2073. 13
  2074. 8 12
  2075. 0 265 "StepNumber"
  2076. 13
  2077. 8 10
  2078. 6 12
  2079. 5 1
  2080. 18 0
  2081. 11 00001594
  2082. 0 27 21
  2083. 13
  2084. 11 00000751
  2085. 5 0
  2086. 16 DefineApp &1 &2 &3 &4
  2087. 13
  2088. 18 0
  2089. 11 00000738
  2090. 6 10
  2091. 5 1
  2092. 18 0
  2093. 11 00000725
  2094. 5 2
  2095. 8 10
  2096. 10 00000738
  2097. 10 00001581
  2098. 0 27 22
  2099. 13
  2100. 11 00001533
  2101. 5 0
  2102. 16 Construct "{1}" "{2}" &5 &6 &11
  2103. 13
  2104. 18 0
  2105. 11 00001520
  2106. 0 296 1
  2107. 2 101 1 "_Default.sty" 1 0
  2108. 13
  2109. 11 00001507
  2110. 16 Redraw &7 1
  2111. 16 StrPath "{9}"
  2112. 13
  2113. 8 13
  2114. 7 "{13}{3}.SMM"
  2115. 8 14
  2116. 0 789 "Please wait...Now building {14}"
  2117. 5 2
  2118. 8 15
  2119. 6 1
  2120. 8 16
  2121. 16 InsertDefine "NumDec" 2
  2122. 16 InsertDefine "NumberItems" "{2}"
  2123. 16 InsertDefine "DialogTitle" "{16}"
  2124. 16 InsertDefine "HelpText" "{6}"
  2125. 16 InsertDefine "Formula" "{5}"
  2126. 5 1
  2127. 8 17
  2128. 5 10
  2129. 6 17
  2130. 18 2
  2131. 12 00001285
  2132. 10 00001348
  2133. 5 1
  2134. 6 17
  2135. 3 0
  2136. 8 17
  2137. 10 00001206
  2138. 6 17
  2139. 22 11
  2140. 16 InsertDefine "Value{17}Text" [X]
  2141. 10 00001250
  2142. 2 102 1 "{13}BUILDER.SAM" 9 ""
  2143. 2 104 1 "{14}" 32 "{6}" ""
  2144. 13
  2145. 11 00001458
  2146. 2 147 1
  2147. 5 3
  2148. 8 10
  2149. 10 00001469
  2150. 5 2
  2151. 8 10
  2152. 16 ReDraw "{7}" 0
  2153. 0 789 ""
  2154. 0 296 0
  2155. 10 00001520
  2156. 10 00001581
  2157. 0 27 23
  2158. 13
  2159. 11 00001581
  2160. 16 "{14}"
  2161. 5 3
  2162. 8 10
  2163. 10 00001604
  2164. 5 0
  2165. 8 8
  2166. 0 264 "StepNumber" "{10}"
  2167. 10 00000133
  2168. 16 FontDlg 4 0 0
  2169. 0 266 "StepNumber"
  2170. 6 0
  2171. 15
  2172. 9
  2173. 14 InitMainBox
  2174. 0 32 2
  2175. 0 296 1
  2176. 5 1000
  2177. 8 4
  2178. 5 1004
  2179. 6 4
  2180. 18 2
  2181. 12 00000124
  2182. 10 00000163
  2183. 5 1
  2184. 6 4
  2185. 3 0
  2186. 8 4
  2187. 10 00000046
  2188. 16 FontDlg 3 "{0}" "{4}"
  2189. 10 00000091
  2190. 0 265 "StepNumber"
  2191. 13
  2192. 8 5
  2193. 5 1
  2194. 6 5
  2195. 18 0
  2196. 11 00000357
  2197. 7 ""
  2198. 8 6
  2199. 0 44 "{0}" 22
  2200. 13
  2201. 0 284 "user,EnableWindow,HHH" [X] 0
  2202. 0 44 "{0}" 23
  2203. 13
  2204. 0 284 "user,EnableWindow,HHH" [X] 0
  2205. 10 00000717
  2206. 5 2
  2207. 6 5
  2208. 18 0
  2209. 11 00000542
  2210. 7 "You are on step two."
  2211. 8 6
  2212. 0 44 "{0}" 22
  2213. 13
  2214. 0 284 "user,EnableWindow,HHH" [X] 1
  2215. 0 44 "{0}" 23
  2216. 13
  2217. 0 284 "user,EnableWindow,HHH" [X] 0
  2218. 10 00000717
  2219. 5 3
  2220. 6 5
  2221. 18 0
  2222. 11 00000717
  2223. 7 " You are on step three."
  2224. 8 6
  2225. 0 44 "{0}" 22
  2226. 13
  2227. 0 284 "user,EnableWindow,HHH" [X] 1
  2228. 0 44 "{0}" 23
  2229. 13
  2230. 0 284 "user,EnableWindow,HHH" [X] 1
  2231. 0 43 "{0}" 1003 "{6}"
  2232. 5 20
  2233. 6 5
  2234. 3 0
  2235. 0 43 "{0}" [X] 1
  2236. 0 296 0
  2237. 6 3
  2238. 15
  2239. 9
  2240. 14 DefineApp
  2241. 0 32 2
  2242. 0 802
  2243. 13
  2244. 8 5
  2245. 0 31 1005 "This is the example text that will be placed into the welcome box and will explain how the app works"
  2246. 0 31 1002 "1.  Type in the name you want to appear at the top of the dialog box: (30 char.)"
  2247. 0 31 1003 "2.  Name of the macro to create: "
  2248. 0 31 1004 "3.  Number of variables: (1 - 6)"
  2249. 0 31 8000 "{0}"
  2250. 0 31 8001 "{1}"
  2251. 0 31 8002 "{2}"
  2252. 0 31 8003 "{3}"
  2253. 0 41 8002 "{5}!CBDefineApp"
  2254. 0 41 8001 "{5}!CBDefineApp"
  2255. 0 41 0 "{5}!InitDefineApp"
  2256. 0 47 112 "{5}!DisplayHelp"
  2257. 0 26 "." "DefineApp"
  2258. 13
  2259. 8 6
  2260. 6 6
  2261. 5 1
  2262. 18 1
  2263. 11 00000594
  2264. 5 -1
  2265. 15
  2266. 9
  2267. 0 27 8002
  2268. 13
  2269. 0 20 [X] 1 "."
  2270. 13
  2271. 28 2
  2272. 16 FindAndReplace &2 " " "_"
  2273. 0 27 8000
  2274. 13
  2275. 28 0
  2276. 0 27 8001
  2277. 13
  2278. 28 1
  2279. 0 27 8003
  2280. 13
  2281. 28 3
  2282. 6 4
  2283. 15
  2284. 9
  2285. 14 CBDefineApp
  2286. 0 32 2
  2287. 0 42 "{0}" 8002
  2288. 13
  2289. 8 4
  2290. 0 42 "{0}" 8001
  2291. 13
  2292. 8 5
  2293. 6 5
  2294. 5 6
  2295. 18 3
  2296. 11 00000124
  2297. 0 43 "{0}" 8001 6
  2298. 6 4
  2299. 7 ""
  2300. 18 1
  2301. 6 5
  2302. 7 ""
  2303. 18 1
  2304. 1 1
  2305. 11 00000244
  2306. 0 44 "{0}" 1
  2307. 13
  2308. 0 284 "user,EnableWindow,HHH" [X] 1
  2309. 10 00000299
  2310. 0 44 "{0}" 1
  2311. 13
  2312. 0 284 "user,EnableWindow,HHH" [X] 0
  2313. 6 3
  2314. 15
  2315. 9
  2316. 14 InitDefineApp
  2317. 0 32 2
  2318. 0 296 1
  2319. 5 1000
  2320. 8 4
  2321. 5 1004
  2322. 6 4
  2323. 18 2
  2324. 12 00000126
  2325. 10 00000165
  2326. 5 1
  2327. 6 4
  2328. 3 0
  2329. 8 4
  2330. 10 00000048
  2331. 16 FontDlg 3 "{0}" "{4}"
  2332. 10 00000093
  2333. 16 FontDlg 3 "{0}" 8000
  2334. 16 FontDlg 3 "{0}" 8001
  2335. 16 FontDlg 3 "{0}" 8002
  2336. 0 44 "{0}" 8000
  2337. 13
  2338. 0 1036 [X] 1045 30 ""
  2339. 0 44 "{0}" 8002
  2340. 13
  2341. 0 1036 [X] 1045 8 ""
  2342. 0 44 "{0}" 8001
  2343. 13
  2344. 0 1036 [X] 1045 1 ""
  2345. 0 44 "{0}" 8000
  2346. 13
  2347. 0 284 "user,SetFocus,HH" [X]
  2348. 16 CBDefineApp "{0}" "{1}" "{2}"
  2349. 0 296 0
  2350. 6 3
  2351. 15
  2352. 9
  2353. 14 Construct
  2354. 0 32 2
  2355. 0 802
  2356. 13
  2357. 8 6
  2358. 0 271 "NumberItems" 1
  2359. 0 264 "NumberItems" "{1}"
  2360. 0 31 1020 "1.  Enter text to help your users to figure out how to fill in the dialog box. (80 char.)"
  2361. 0 31 1021 "2.  Enter the formula to calculate the answer.  For example, @AVG({{VALUE1},{{VALUE2},{{VALUE3})"
  2362. 0 31 1022 "3.  Enter real names for the values: (20 char)"
  2363. 0 31 8060 "{2}"
  2364. 0 31 8050 "{3}"
  2365. 5 1
  2366. 8 7
  2367. 6 1
  2368. 6 7
  2369. 18 2
  2370. 12 00000480
  2371. 10 00000536
  2372. 5 1
  2373. 6 7
  2374. 3 0
  2375. 8 7
  2376. 10 00000405
  2377. 5 8000
  2378. 6 7
  2379. 3 0
  2380. 6 7
  2381. 22 4
  2382. 0 31 [X] [X]
  2383. 10 00000447
  2384. 0 41 0 "{6}!InitConstruct"
  2385. 0 41 22 "{6}!FunButton"
  2386. 0 47 112 "{6}!DisplayHelp"
  2387. 0 26 "." "Construct"
  2388. 13
  2389. 8 8
  2390. 0 266 "NumberItems"
  2391. 6 8
  2392. 5 1
  2393. 18 1
  2394. 11 00000711
  2395. 5 -1
  2396. 15
  2397. 9
  2398. 0 27 8060
  2399. 13
  2400. 28 2
  2401. 16 FindAndReplace &2 " " ""
  2402. 0 39 34
  2403. 13
  2404. 16 FindAndReplace &2 [X] ""
  2405. 0 27 8050
  2406. 13
  2407. 28 3
  2408. 5 1
  2409. 8 9
  2410. 6 1
  2411. 6 9
  2412. 18 2
  2413. 12 00000909
  2414. 10 00000965
  2415. 5 1
  2416. 6 9
  2417. 3 0
  2418. 8 9
  2419. 10 00000834
  2420. 6 9
  2421. 5 8000
  2422. 6 9
  2423. 3 0
  2424. 0 27 [X]
  2425. 13
  2426. 23 4
  2427. 10 00000876
  2428. 6 5
  2429. 15
  2430. 9
  2431. 14 InitConstruct
  2432. 0 32 2
  2433. 0 296 1
  2434. 0 265 "NumberItems"
  2435. 13
  2436. 8 4
  2437. 5 1
  2438. 8 1
  2439. 5 9
  2440. 6 1
  2441. 18 2
  2442. 12 00000150
  2443. 10 00000483
  2444. 5 1
  2445. 6 1
  2446. 3 0
  2447. 8 1
  2448. 10 00000075
  2449. 6 1
  2450. 5 1000
  2451. 3 0
  2452. 16 FontDlg 3 "{0}" [X]
  2453. 6 1
  2454. 5 8000
  2455. 3 0
  2456. 16 FontDlg 3 "{0}" [X]
  2457. 6 1
  2458. 5 8000
  2459. 3 0
  2460. 0 44 "{0}" [X]
  2461. 13
  2462. 0 1036 [X] 1045 20 ""
  2463. 6 1
  2464. 6 4
  2465. 18 3
  2466. 11 00000470
  2467. 6 1
  2468. 5 1000
  2469. 3 0
  2470. 0 44 "{0}" [X]
  2471. 13
  2472. 0 284 "user,ShowWindow,HHH" [X] 0
  2473. 6 1
  2474. 5 8000
  2475. 3 0
  2476. 0 44 "{0}" [X]
  2477. 13
  2478. 0 284 "user,ShowWindow,HHH" [X] 0
  2479. 10 00000117
  2480. 16 FontDlg 3 "{0}" 1020
  2481. 16 FontDlg 3 "{0}" 1021
  2482. 16 FontDlg 3 "{0}" 1022
  2483. 16 FontDlg 3 "{0}" 8050
  2484. 16 FontDlg 3 "{0}" 8060
  2485. 0 44 "{0}" 8050
  2486. 13
  2487. 0 284 "user,SetFocus,HH" [X]
  2488. 0 44 "{0}" 8050
  2489. 13
  2490. 0 1036 [X] 1045 80 ""
  2491. 16 SizeBox "{0}" "{4}"
  2492. 0 296 0
  2493. 6 3
  2494. 15
  2495. 9
  2496. 14 SizeBox
  2497. 0 32 2
  2498. 0 284 "user,getsystemmetrics,HH" 4
  2499. 13
  2500. 8 3
  2501. 5 4
  2502. 21 4 [X]
  2503. 0 284 "user,GetWindowRect,HHN" "{0}" &4
  2504. 5 3
  2505. 22 4
  2506. 5 1
  2507. 22 4
  2508. 3 1
  2509. 8 5
  2510. 6 3
  2511. 5 20
  2512. 18 0
  2513. 11 00000229
  2514. 5 22
  2515. 6 1
  2516. 4 0
  2517. 5 200
  2518. 3 0
  2519. 8 6
  2520. 10 00000262
  2521. 5 26
  2522. 6 1
  2523. 4 0
  2524. 5 250
  2525. 3 0
  2526. 8 6
  2527. 5 1
  2528. 22 4
  2529. 5 2
  2530. 22 4
  2531. 0 284 "User,MoveWindow,HHHHHHA" "{0}" [X] [X] "{5}" "{6}" 1
  2532. 6 2
  2533. 15
  2534. 9
  2535. 14 DisplayHelp
  2536. 0 284 "user,FindWindow,HCC" "AmiProWndA" 0
  2537. 13
  2538. 8 1
  2539. 0 798
  2540. 13
  2541. 0 16 [X] "HelpPack.hlp"
  2542. 13
  2543. 8 2
  2544. 5 105
  2545. 8 3
  2546. 0 284 "user,WinHelp,HHCHJ" "{1}" "{2}" 1 "{3}"
  2547. 6 0
  2548. 15
  2549. 9
  2550. 14 FunButton
  2551. 16 ShowFunctions "{0}" 8060
  2552. 6 3
  2553. 15
  2554. 9
  2555. 14 FindAndReplace
  2556. 5 0
  2557. 8 5
  2558. 5 0
  2559. 0 808 "{5}" "{0}" "{1}"
  2560. 13
  2561. 0 805 &4 [X]
  2562. 13
  2563. 18 1
  2564. 11 00000240
  2565. 6 4
  2566. 5 1
  2567. 3 1
  2568. 0 806 "{0}" [X]
  2569. 13
  2570. 8 6
  2571. 0 14 "{0}"
  2572. 13
  2573. 6 4
  2574. 3 1
  2575. 0 807 "{0}" [X]
  2576. 13
  2577. 8 7
  2578. 0 16 "{6}" "{2}" "{7}"
  2579. 13
  2580. 28 0
  2581. 10 00000029
  2582. 6 3
  2583. 15
  2584. 9
  2585. 14 Redraw
  2586. 0 32 2
  2587. 5 4
  2588. 21 3 [X]
  2589. 5 1
  2590. 6 1
  2591. 18 0
  2592. 11 00000156
  2593. 0 1313 267
  2594. 13
  2595. 28 0
  2596. 0 284 "user,SendMessage,JHHHJ" "{0}" 11 0 ""
  2597. 6 0
  2598. 15
  2599. 9
  2600. 10 00000330
  2601. 5 0
  2602. 6 1
  2603. 18 0
  2604. 11 00000330
  2605. 0 284 "user,SendMessage,JHHHJ" "{0}" 11 1 ""
  2606. 0 284 "User,GetClientRect,HHN" "{0}" &3
  2607. 0 284 "user,InvalidateRect,HHFH" "{0}" &3 1
  2608. 10 00000330
  2609. 6 2
  2610. 15
  2611. 9
  2612. 14 strpath
  2613. 0 14 "{0}"
  2614. 13
  2615. 8 3
  2616. 7 "\"
  2617. 0 15 "{0}" "{3}" 1
  2618. 13
  2619. 0 805 &2 [X]
  2620. 13
  2621. 18 1
  2622. 11 00000134
  2623. 6 3
  2624. 5 1
  2625. 3 1
  2626. 8 3
  2627. 10 00000033
  2628. 0 14 "{0}"
  2629. 13
  2630. 6 3
  2631. 3 1
  2632. 0 807 "{0}" [X]
  2633. 13
  2634. 8 4
  2635. 6 3
  2636. 5 1
  2637. 3 1
  2638. 0 806 "{0}" [X]
  2639. 13
  2640. 8 5
  2641. 0 807 "{5}" 1
  2642. 13
  2643. 7 "\"
  2644. 18 1
  2645. 11 00000297
  2646. 0 16 "{5}" "\"
  2647. 13
  2648. 8 5
  2649. 6 5
  2650. 15
  2651. 9
  2652. 6 1
  2653. 15
  2654. 9
  2655. 14 InsertDefine
  2656. 0 39 34
  2657. 13
  2658. 8 3
  2659. 0 6 "Define[9]{0}[9]{3}{1}{3}[13]"
  2660. 6 2
  2661. 15
  2662. 9
  2663. 14 FontDlg
  2664. 5 1
  2665. 6 0
  2666. 18 0
  2667. 11 00000255
  2668. 0 284 "gdi,CreateFont,HHHHHHHHHHHHHHC" 13 0 0 0 400 0 0 0 0 0 0 0 0 "Helv"
  2669. 13
  2670. 8 4
  2671. 0 271 "FontHandle" 1
  2672. 6 4
  2673. 11 00000217
  2674. 0 264 "FontHandle" "{4}"
  2675. 6 4
  2676. 15
  2677. 9
  2678. 10 00000229
  2679. 5 0
  2680. 15
  2681. 9
  2682. 10 00000834
  2683. 10 00000834
  2684. 5 2
  2685. 6 0
  2686. 18 0
  2687. 11 00000381
  2688. 0 265 "FontHandle"
  2689. 13
  2690. 8 5
  2691. 6 5
  2692. 11 00000356
  2693. 6 5
  2694. 15
  2695. 9
  2696. 10 00000368
  2697. 5 0
  2698. 15
  2699. 9
  2700. 10 00000834
  2701. 5 3
  2702. 6 0
  2703. 18 0
  2704. 11 00000596
  2705. 0 265 "FontHandle"
  2706. 13
  2707. 8 5
  2708. 6 5
  2709. 11 00000558
  2710. 0 44 "{1}" "{2}"
  2711. 13
  2712. 8 6
  2713. 0 284 "user,SendMessage,HHHHJ" "{6}" 48 "{5}" 0
  2714. 5 1
  2715. 15
  2716. 9
  2717. 10 00000570
  2718. 5 0
  2719. 15
  2720. 9
  2721. 10 00000834
  2722. 10 00000834
  2723. 5 4
  2724. 6 0
  2725. 18 0
  2726. 11 00000785
  2727. 0 265 "FontHandle"
  2728. 13
  2729. 8 5
  2730. 6 5
  2731. 11 00000730
  2732. 0 284 "gdi,DeleteObject,HH" "{5}"
  2733. 5 1
  2734. 8 7
  2735. 10 00000740
  2736. 5 0
  2737. 8 7
  2738. 0 266 "FontHandle"
  2739. 6 7
  2740. 15
  2741. 9
  2742. 10 00000834
  2743. 0 3 "Fontdlg received an invalid parameter {0}"
  2744. 6 3
  2745. 15
  2746. 9
  2747. 14 ShowFunctions
  2748. 0 284 "User,EnableWindow,AHA" "{0}" 0
  2749. 0 802
  2750. 13
  2751. 8 3
  2752. 0 41 20 "{3}!RadioCall"
  2753. 0 41 21 "{3}!RadioCall"
  2754. 0 41 22 "{3}!RadioCall"
  2755. 0 41 23 "{3}!RadioCall"
  2756. 0 41 0 "{3}!InitCall"
  2757. 0 41 9000 "{3}!RadioCall"
  2758. 0 47 112 "{3}!DisplayHelp"
  2759. 0 31 20 1
  2760. 0 26 "." "More"
  2761. 13
  2762. 8 4
  2763. 6 4
  2764. 5 1
  2765. 18 0
  2766. 11 00000415
  2767. 0 42 "{0}" "{1}"
  2768. 13
  2769. 8 5
  2770. 0 27 8010
  2771. 13
  2772. 8 6
  2773. 0 16 "{5}" "{6}"
  2774. 13
  2775. 8 7
  2776. 0 43 "{0}" "{1}" "{7}"
  2777. 0 284 "User,EnableWindow,AHA" "{0}" 1
  2778. 0 44 "{0}" "{1}"
  2779. 13
  2780. 0 284 "user,SetFocus,HH" [X]
  2781. 6 2
  2782. 15
  2783. 9
  2784. 14 InitCall
  2785. 0 32 2
  2786. 16 FontDlg 3 "{0}" 1001
  2787. 16 FontDlg 3 "{0}" 8010
  2788. 16 ManageList "{0}" 9000 "Financial"
  2789. 0 42 "{0}" 9000
  2790. 13
  2791. 8 4
  2792. 0 286 "Financial" "{4}" "AmiCalc.ini"
  2793. 13
  2794. 8 5
  2795. 0 20 "{5}" 2 "~"
  2796. 13
  2797. 8 6
  2798. 0 20 "{5}" 1 "~"
  2799. 13
  2800. 8 7
  2801. 0 43 "{0}" 8010 "{6}"
  2802. 0 43 "{0}" 1001 "{7}"
  2803. 6 3
  2804. 15
  2805. 9
  2806. 14 RadioCall
  2807. 0 32 2
  2808. 0 42 "{0}" 20
  2809. 13
  2810. 11 00000087
  2811. 7 "Financial"
  2812. 8 4
  2813. 10 00000272
  2814. 0 42 "{0}" 22
  2815. 13
  2816. 11 00000155
  2817. 7 "Mathematical"
  2818. 8 4
  2819. 10 00000272
  2820. 0 42 "{0}" 21
  2821. 13
  2822. 11 00000222
  2823. 7 "Statistical"
  2824. 8 4
  2825. 10 00000272
  2826. 0 42 "{0}" 23
  2827. 13
  2828. 11 00000272
  2829. 7 "Logical"
  2830. 8 4
  2831. 5 9000
  2832. 6 1
  2833. 18 0
  2834. 11 00000498
  2835. 0 42 "{0}" 9000
  2836. 13
  2837. 8 5
  2838. 0 286 "{4}" "{5}" "AmiCalc.ini"
  2839. 13
  2840. 8 6
  2841. 0 20 "{6}" 2 "~"
  2842. 13
  2843. 8 7
  2844. 0 20 "{6}" 1 "~"
  2845. 13
  2846. 8 8
  2847. 0 43 "{0}" 8010 "{7}"
  2848. 0 43 "{0}" 1001 "{8}"
  2849. 10 00000711
  2850. 10 00000711
  2851. 16 ManageList "{0}" 9000 "{4}"
  2852. 0 42 "{0}" 9000
  2853. 13
  2854. 8 5
  2855. 0 286 "{4}" "{5}" "AmiCalc.ini"
  2856. 13
  2857. 8 6
  2858. 0 20 "{6}" 2 "~"
  2859. 13
  2860. 8 7
  2861. 0 20 "{6}" 1 "~"
  2862. 13
  2863. 8 8
  2864. 0 43 "{0}" 8010 "{7}"
  2865. 0 43 "{0}" 1001 "{8}"
  2866. 10 00000711
  2867. 6 3
  2868. 15
  2869. 9
  2870. 14 ManageList
  2871. 0 44 "{0}" 9000
  2872. 13
  2873. 0 1036 [X] 1029 0 0
  2874. 0 286 "{2}" 0 "AmiCalc.ini"
  2875. 13
  2876. 8 5
  2877. 5 1
  2878. 8 6
  2879. 5 -1
  2880. 0 20 "{5}" "{6}" "~"
  2881. 13
  2882. 0 805 &4 [X]
  2883. 13
  2884. 18 1
  2885. 11 00000260
  2886. 6 4
  2887. 7 ""
  2888. 18 3
  2889. 11 00000227
  2890. 0 43 "{0}" 9000 "{4}"
  2891. 6 6
  2892. 5 1
  2893. 3 0
  2894. 8 6
  2895. 10 00000105
  2896. 6 3
  2897. 15
  2898. 9
  2899. DIALOG More
  2900. -2134376448 13 61 28 187 118 "" "AmiDialog" "More @Functions" 
  2901. FONT 8 "Helv" 
  2902. 7 12 50 11 20 1342242825 "button" "&Financial" 0 
  2903. 7 24 50 11 21 1342242825 "button" "&Statistical" 0 
  2904. 7 35 54 11 22 1342242825 "button" "&Mathematical" 0 
  2905. 7 46 50 11 23 1342242825 "button" "&Logical" 0 
  2906. 79 15 58 40 9000 1352728579 "listbox" "" 0 
  2907. 7 57 176 24 30 1342308359 "button" "Example" 0 
  2908. 7 83 176 32 31 1342308359 "button" "Description" 0 
  2909. 13 68 148 10 8010 1342177280 "static" "text" 0 
  2910. 13 93 158 20 1001 1342177280 "static" "text" 0 
  2911. 4 3 44 10 1000 1342177280 "static" "Categories:" 0 
  2912. 78 3 40 10 1002 1342177280 "static" "@Functions:" 0 
  2913. 143 3 40 14 1 1342373889 "button" "Insert" 0 
  2914. 143 19 40 14 2 1342373888 "button" "Cancel" 0 
  2915. DIALOG DefineApp
  2916. -2134376448 8 60 47 183 67 "" "AmiDialog" "Define Application" 
  2917. FONT 8 "Helv" 
  2918. 139 3 40 14 1 1342373889 "button" "OK" 0 
  2919. 139 19 40 14 2 1342373888 "button" "Cancel" 0 
  2920. 11 23 119 12 8000 1350631552 "edit" "" 0 
  2921. 93 38 37 12 8002 1350631552 "edit" "" 0 
  2922. 93 52 16 12 8001 1350631552 "edit" "" 0 
  2923. 4 4 125 16 1002 1342177280 "static" "AppName" 0 
  2924. 4 40 88 10 1003 1342177280 "static" "NumFields" 0 
  2925. 4 54 88 10 1004 1342177280 "static" "MacName" 0 
  2926. DIALOG Construct
  2927. -2134376448 20 68 16 168 188 "" "AmiDialog" "Design Dialog Box" 
  2928. FONT 8 "Helv" 
  2929. 124 3 40 14 1 1342373889 "button" "OK" 0 
  2930. 124 19 40 14 3 1342373888 "button" "Cancel" 0 
  2931. 113 35 51 14 22 1342373888 "button" "@&Functions..." 0 
  2932. 6 24 101 22 8050 1350631428 "edit" "" 0 
  2933. 5 68 158 24 8060 1350631428 "edit" "" 0 
  2934. 6 3 115 20 1020 1342177280 "static" "Help text for the application:" 0 
  2935. 5 50 146 16 1021 1342177280 "static" "Formula for the application" 0 
  2936. 79 104 66 12 8001 1350631552 "edit" "" 0 
  2937. 79 118 66 12 8002 1350631552 "edit" "" 0 
  2938. 79 132 66 12 8003 1350631552 "edit" "" 0 
  2939. 20 107 45 10 1001 1342177280 "static" "Label for value1" 0 
  2940. 20 121 45 10 1002 1342177280 "static" "Label for value2" 0 
  2941. 20 135 45 10 1003 1342177280 "static" "Label for value3" 0 
  2942. 5 94 127 10 1022 1342177280 "static" "text" 0 
  2943. 79 146 66 12 8004 1350631552 "edit" "" 0 
  2944. 79 160 66 12 8005 1350631552 "edit" "" 0 
  2945. 79 176 66 12 8006 1350631552 "edit" "" 0 
  2946. 20 149 45 10 1004 1342177280 "static" "Label for value4" 0 
  2947. 20 163 45 10 1005 1342177280 "static" "Label for value5" 0 
  2948. 20 177 45 10 1006 1342177280 "static" "Label for value6" 0 
  2949. DIALOG MainBox
  2950. -2134376448 13 60 38 197 113 "" "AmiDialog" "Calculation Application Builder" 
  2951. FONT 8 "Helv" 
  2952. 154 2 40 14 1 1342373889 "button" "OK" 0 
  2953. 154 18 40 14 2 1342373888 "button" "Cancel" 0 
  2954. 36 37 120 10 21 1342242825 "button" "&Define the calculation application" 0 
  2955. 36 63 156 10 22 1342242825 "button" "De&sign the user interface for the application" 0 
  2956. 36 89 113 10 23 1342242825 "button" "&Run the calculation application" 0 
  2957. 48 47 140 10 1000 1342177280 "static" "text" 0 
  2958. 48 73 143 10 1001 1342177280 "static" "text" 0 
  2959. 48 99 148 10 1002 1342177280 "static" "text" 0 
  2960. 38 19 80 10 1003 1342177280 "static" "text" 0 
  2961. 8 2 134 16 1004 1342177280 "static" "text" 0 
  2962. 4 23 28 23 1005 1342177290 "static" "text" 0 
  2963. 4 51 28 23 1006 1342177290 "static" "text" 0 
  2964. 4 78 28 23 1007 1342177290 "static" "text" 0 
  2965. 00032868
  2966.